# Version 1.0
# paddle镜像
FROM registry.baidubce.com/paddlepaddle/paddle:2.6.0

LABEL maintainer="xeval@sina.com"

#ENV
ENV APP_HOME=/home/face-engine

#工作目录
WORKDIR /home

#写入源码
COPY . ${APP_HOME}


#转到app目录
RUN cd ${APP_HOME}
RUN pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple  

#BUGS [github.com/PaddlePaddle/Paddle/issues#60477]直接回退paddle无效
RUN pip uninstall -y paddlepaddle
RUN pip install --no-cache-dir paddlepaddle==2.5.2

#安装依赖
RUN pip install -r ${APP_HOME}/requirements.txt



#下载数据集
RUN python ${APP_HOME}/install.py

#EXPOSE 映射端口
EXPOSE 6268